package com.xjprojectc.business.service.impl;

import java.util.List;

import com.tech.framework.service.impl.BaseServiceImpl;
import com.xjprojectc.business.pojo.T_callpaymentrecord;
import com.xjprojectc.business.service.CallpaymentrecordService;

@SuppressWarnings("unchecked")
public class CallpaymentrecordServiceImpl extends BaseServiceImpl implements CallpaymentrecordService{
	
	public List<T_callpaymentrecord> getCallpaymentrecordByPager(T_callpaymentrecord callpaymentrecord) {
		return find(T_callpaymentrecord.class.getName()+".selectPaged", callpaymentrecord);
	}
	
	public List<T_callpaymentrecord> getCallpaymentrecordByList(T_callpaymentrecord callpaymentrecord) {
		return find(T_callpaymentrecord.class.getName()+".select", callpaymentrecord);
	}

	public T_callpaymentrecord getOneCallpaymentrecord(String id) {
		return (T_callpaymentrecord) find(T_callpaymentrecord.class.getName()+".selectById",id).get(0);
	}

	public int getPageCount(T_callpaymentrecord managerinfo) {
		return Integer.parseInt(find(T_callpaymentrecord.class.getName()+".selectCount",managerinfo).get(0).toString());
	}
	
	@SuppressWarnings("unchecked")
	public boolean addCallpaymentrecord(T_callpaymentrecord callpaymentrecord) {
		boolean bool = false;
		try {
			insert(callpaymentrecord);
			bool = true;
		} catch (Exception e) {
		}
		return bool;
	}

	public boolean delCallpaymentrecord(T_callpaymentrecord callpaymentrecord) {
		boolean bool = false;
		try {
			remove(callpaymentrecord);
			bool = true;
		} catch (Exception e) {
		}
		return bool;
	}


	public boolean updateCallpaymentrecord(T_callpaymentrecord callpaymentrecord) {
		boolean bool = false;
		try {
			update(callpaymentrecord);
			bool = true;
		} catch (Exception e) {
		}
		return bool;
	}
	
	public List getCountDate(T_callpaymentrecord callpaymentrecord) {
		return find(T_callpaymentrecord.class.getName()+".selectCountDate", callpaymentrecord);
	}
	
	public T_callpaymentrecord getOneBySerialnumber(String erialnumber) {
		return (T_callpaymentrecord) find(T_callpaymentrecord.class.getName()+".selectBySerialnumber",erialnumber).get(0);
	}

	
}
